package com.echo.code.spring.springbootdemo.aop;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Description
 *
 * @author baiyp
 * @version 1.0.0
 * @date 2019/04/27
 */
public class App {

  public static void main(String[] args) {
    AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
    context.register(UserConfig.class);
    context.refresh();
    UserService service = context.getBean(UserService.class);
    service.addUser(User.builder().userName("Echo").build());
    context.close();
  }
}
